package com.xxx.dubbo.user.service;

import com.alibaba.dubbo.config.annotation.Service;
import com.xxx.dubbo.user.api.UserService;
import org.springframework.stereotype.Component;

/**
 * dubbo service实现类
 */
@Service    // 使用dubbo的@Service注解暴露dubbo服务
@Component  // 使用spring的@Component注解将Service注入到spring容器中
public class UserServiceImpl implements UserService {

    @Override
    public String hello(String name) {
        System.out.println("hello:" + name);
        return "hello " + name;
    }

}
